﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.Product;

namespace ZBJF.Warranty.IBLL
{
    public partial interface IProductBrandsService
    {
        ProductBrands LoadByID(long id);
        ProductBrands LoadByName(string brandName);
        /// <summary>
        /// 获取含有该名称的所有产品品牌
        /// </summary>
        /// <param name="brandName">品牌名称</param>
        /// <returns></returns>
        IQueryable<ProductBrands> GetBrandsLikeName(string brandName);
        bool IsExist(string brandName, long id = 0);

        /// <summary>
        /// 获得所有配件类型的品牌
        /// </summary>
        /// <returns></returns>
        IQueryable<ProductBrands> GetAllProductBrand();
        IQueryable<ProductBrands> GetPagingList(ProductBrandsModel model, out int total);

        /// <summary>
        /// 获取品牌名称
        /// </summary>
        /// <param name="productBrandId">品牌ID</param>
        /// <returns></returns>
        string GetBrandName(long productBrandId);
    }
}
